package com.com.test17;

public class Receptionist {
    //创建过滤器
    private Filter filter;

    public Receptionist() {
    }

    public Receptionist(Filter filter) {
        this.filter = filter;
    }

    public Filter getFilter() {
        return filter;
    }

    public void setFilter(Filter filter) {
        this.filter = filter;
    }
    //接待
    public void handleUser(User user){
//        if (user.getType() != null){
//            return;
//        }
        //过滤
        filter.filterUser(user);
    }
}
